home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / mhis020.zip / CALLINFO.MH < prev    next >
Text File  |  1996-09-06  |  987b  |  45 lines

  1. #ifndef __CALLINFO_MH
  2. #define __CALLINFO_MH
  3.  
  4. long time_online (Ref struct _callinfo: ci) {
  5.   return (stamp_to_long (ci.logoff) - stamp_to_long (ci.login));
  6.   }
  7.  
  8. string flag_string (int: call_flags) {
  9.   string: result;
  10.   result := "";
  11.   if (call_flags = 0) {
  12.     return "none";
  13.     };
  14.   if (call_flags & CALL_LOGON) {
  15.     result := result + "L";
  16.     };
  17.   if (call_flags & CALL_CARRIER) {
  18.     result := result + "C";
  19.     };
  20.   if (call_flags & CALL_EJECTED) {
  21.     result := result + "E";
  22.     };
  23.   if (call_flags & CALL_PAGED_AH) {
  24.     result := result + "P";
  25.     };
  26.   if (call_flags & CALL_DLEXCEED) {
  27.     result := result + "D";
  28.     };
  29.   if (call_flags & CALL_EXPIRED) {
  30.     result := result + "X";
  31.     };
  32.   if (call_flags & CALL_TIMELIMIT) {
  33.     result := result + "T";
  34.     };
  35.   if (call_flags & CALL_NERD) {
  36.     result := result + "N";
  37.     };
  38.   if (call_flags & CALL_BARRPWD) {
  39.     result := result + "B";
  40.     };
  41.   return result;
  42.   }
  43.  
  44. #endif
  45.